<table class="table table-striped table-bordered table-hover">

    <tr>
    <th width="160" height="40">A&ccedil;&otilde;es</th>
    <th>Nome</th>
    <th width="200"><a href="?pag=docarea&ordem=tip_id"><i class="iicon-chevron-down"></i> Tipo de documento</a></th>
    </tr>

    <?php

    $sql = "SELECT * FROM docarea 
    LEFT JOIN doctipo ON doctipo.doc_tip_id=docarea.doc_tip_id
    WHERE docarea.sta_id='1' ORDER BY $ordem";
    $res = sql($sql);
    while($linha = mysql_fetch_array($res)) {

    ?>

    <tr>

    <td height="40">
      
      <input name="excluir[]" type="checkbox" value="<?=$linha['doc_are_id'];?>"/><i class="icon-trash"></i> Excluir&nbsp;&nbsp;|&nbsp;
      <a href="?pag=docarea_alt&doc_are_id=<?=$linha['doc_are_id'];?>"><i class="icon-pencil"></i> Editar</a>
      
    </td>
    <td><?=$linha['doc_are_nome'];?></td>
    <td><?=$linha['doc_tip_nome'];?></td>
    </tr>

    <?
    } 
    ?>
</table>